package com.syf.feign;

import com.syf.config.feign.OAuth2FeignConfig;
import com.syf.domain.DepthItemVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author syf
 * @create 2021-12-13 23:21
 */
@FeignClient(name = "match-service", contextId = "orderBooksFeignClient", configuration = OAuth2FeignConfig.class)
public interface OrderBooksFeignClient {

    /**
     * 查询该交易对的盘口数据【买入和卖出盘口】
     * key :sell:asks   value: List<DepthItemVo>
     * key:buy:bids    value:List<DepthItemVo>
     * @param symbol
     * @return
     */
    @RequestMapping("/match/depth")
    Map<String, List<DepthItemVo>> querySymbolDepth(@RequestParam String symbol);

}
